<template>
    <div>
        <van-collapse v-model="activeName" accordion>
            <template>
                <van-collapse-item v-for="(item,index) in lists" :key="index" v-show="item.type == '1'"
                    :title="item.qy">
                    <van-cell-group>
                        <van-field v-model="item.qy" label="企业名称" readonly />
                    </van-cell-group>
                    <van-cell-group>
                        <van-field v-model="item.qydm" label="企业代码" readonly />
                    </van-cell-group>
                    <van-cell-group>
                        <van-field v-model="item.shsj" label="审核时间" readonly />
                    </van-cell-group>
                    <van-cell-group>
                        <van-field v-model="item.shjg" label="审核状态" readonly />
                    </van-cell-group>
                    <van-steps :active="1" v-show="item.shjg == '审核成功'">
                        <van-step>正在审核</van-step>
                        <van-step>审核成功</van-step>
                    </van-steps>
                    <van-steps :active="1" v-show="item.shjg == '审核失败'" active-color="#ee0a24">
                        <van-step>正在审核</van-step>
                        <van-step>审核失败</van-step>
                    </van-steps>
                </van-collapse-item>
            </template>
        </van-collapse>
        <van-empty description="暂无审核" v-show="value" />
    </div>
</template>

<script>
    export default {
        data() {
            return {
                activeName: '1',
                lists: [],
                value: true,
                shibai: false,
                chengg: false,
                sfz: ""
            }
        },
        created() {
            this.wdsq()
        },
        mounted() {
            var that = this
            var mx = window.sessionStorage.getItem("mz")
            var sjh = window.sessionStorage.getItem("sjh")
            var sfz = window.sessionStorage.getItem("sfz")
            var xb = window.sessionStorage.getItem("xb")
            that.xm = mx
            that.sfz = sfz
            that.sjh = sjh
        },
        methods: {
            wdsq() {
                var that = this
                var sfz = window.sessionStorage.getItem("sfz")
                var jmqsjtj = JSON.stringify({
                    //入参内容
                    "sfz": sfz
                    // sfz: "411122200010288050"
                })
                var jmhsjtj = SM.encrypt(jmqsjtj,
                    //公钥
                    "04dc1578201807270594d42a693f039abd019967a29b24ea6bd5c92c65a8ed25618541144d0ea3be942d47017e36821f821e268182073e8a734b083a4d4c6157fb"
                );
                // var appid = that.appid;
                var appid = "Embmzckm";
                var interfaceid = 'shwclb';
                var interfacecontent = jmhsjtj
                var fromport = '2';
                var signurl = 'https://' + urldomaincreatesign;
                var gatewayurl = 'https://' + urldomaingateway;
                vaildInterfacefn(appid, interfaceid, interfacecontent, fromport, signurl, gatewayurl).then(value => {
                    //私钥
                    var jjjsjtj = SM.decrypt(value,
                        "6636756e69f8276c514919d04eaf928498b443bfb783e8fe6fa6977056c4d90b");
                    var lists = JSON.parse(jjjsjtj)
                    that.lists = lists.result
                    console.log("全部数据", that.lists);
                    lists.result.forEach(e => {
                        if (e.type == 1) {
                            that.value = false
                        }
                    });
                })
            }
        },
    }
</script>

<style scoped>
    .van-collapse-item__content {
        padding: 11px 60px !important;
    }

    .van-steps--horizontal {
        padding: 11px 58px 0;
    }
</style>